package com.baizhi.cmfz.controller;

import com.baizhi.cmfz.annotation.LogAnnotation;
import com.baizhi.cmfz.entity.Admin;
import com.baizhi.cmfz.entity.Menu;
import com.baizhi.cmfz.service.MenuService;
import com.baizhi.cmfz.service.impl.MenuServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@RequestMapping("/menu")
@Controller
public class MenuController {
    @Autowired
    private MenuServiceImpl menuService;

    @RequestMapping("/showAllMenu")
    @ResponseBody
    @LogAnnotation(value="查询数据",type = "select")
    public List<Menu> showAllMenu(){
        return menuService.showAllMenu();
    }

}
